package cn.wolfcode.mapper;

import cn.wolfcode.domain.Student;
import cn.wolfcode.qo.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface StudentMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Student record);

    Student selectByPrimaryKey(Long id);

    List<Student> selectAll();

    int updateByPrimaryKey(Student record);

    List<Student> selForList(QueryObject qo);

    int selectCountUsername(String username);

    void insertStudentRoomBatch(@Param("id") Long id, @Param("roomId") Long roomId);

    void insertStudentRoleBatch(@Param("id") Long id, @Param("roleIds") Long[] roleIds);

    void deleteStudentRoleBatch(Long id);

    void deleteStudentRoomBatch(Long id);

    int selectCountStudents(Long roomId);

    Student selByUsername(String username);

    int checkRoomPerson(Long roomId);
}